﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

using rent_car.Manejadores;

namespace rent_car.Gui
{
    public partial class FormPrincipal : Form
    {
        public FormPrincipal()
        {
            InitializeComponent(); 
        }       

        private void btnNuevoCliente_Click(object sender, EventArgs e)
        {
            new FormNuevoCliente().ShowDialog(this);
        }

        private void btnNuevoVehiculo_Click(object sender, EventArgs e)
        {
            new FormNuevoVehiculo().ShowDialog(this);
        }

        private void btnNuevoUsuario_Click(object sender, EventArgs e)
        {
            new FormNuevoUsuario().ShowDialog(this);
        }

        private void btnNuevaRenta_Click(object sender, EventArgs e)
        {
            if(ManejadorDeVehiculos.getInstancia().vehiculosDisponibles().Count== 0){
                MessageBox.Show("No hay vehículos disponibles");
                return;
            }
            new FormRentaVehiculos().ShowDialog(this);
        }

        private void registrarCliente_Click(object sender, EventArgs e)
        {
            new FormNuevoCliente().ShowDialog();
        }

        private void modificarEliminarCliente_Click(object sender, EventArgs e)
        {
            new FormMantenimientoDeClientes().ShowDialog(this);
        }

        private void registrarVehiculo_Click(object sender, EventArgs e)
        {
            new FormNuevoVehiculo().ShowDialog(this);
        }

        private void modificarEliminarVehiculo_Click(object sender, EventArgs e)
        {
            new FormMantenimientoDeVehiculos().ShowDialog(this);
        }

        private void registrarUsuarios_Click(object sender, EventArgs e)
        {
            new FormNuevoUsuario().ShowDialog(this);
        }

        private void modificarEliminarUsuario_Click(object sender, EventArgs e)
        {
            new FormMantenimientoDeUsuarios().ShowDialog(this);
        }

        private void marcasToolStripMenuItem_Click(object sender, EventArgs e)
        {
            new FormNuevaMarca().ShowDialog(this);
        }

        private void ciudadesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            new FormNuevaCiudad().ShowDialog(this);
        }

        private void paisesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            new FormNuevoPais().ShowDialog(this);
        }    
    }
}
